<template>
  <div class="tb">
    <van-tabbar v-model="active" fixed>
      <van-tabbar-item icon="wap-home-o" to="/home">首页</van-tabbar-item>
      <van-tabbar-item icon="shopping-cart-o"><a href="./cart.html">购物车</a></van-tabbar-item>
      <van-tabbar-item icon="manager-o" to="/login">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
export default {
  name: 'Tabber',

  data() {
    return {
      active:'home'
    }
  },
  created() {
    this.active = this.$router.name
  },
}
</script>

<style scoped lang="less">
  /deep/ .van-tabbar {
    width: 7.5rem;
  }
</style>
